package com.hourse.platform.controller;

import com.hourse.platform.service.AutoLogService;
import com.hourse.platform.vo.AutoLogQueryVo;
import com.hourse.platform.vo.PageData;
import com.hourse.platform.vo.PageList;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "系统-操作日志管理")
@RestController
@RequestMapping(value = "platform/log")
@Slf4j
public class LogController {

    @Autowired
    private AutoLogService autoLogService;

    @ApiOperation(value = "操作日志管理-查询列表")
    @SneakyThrows
    @PostMapping(value = "selectAll")
    public PageData registerUser(@RequestBody AutoLogQueryVo vo) {

        PageList logs = autoLogService.findAll(vo);

        return logs.SUCCESS();
    }

}
